import request from '@/utils/request'

//新增人脸设备
export function projectFaceDevice_create(para) {
	return request({
		url: '/projectFaceDevice/create',
		method: 'post',
		data: para
	})
}

//编辑人脸设备
export function projectFaceDevice_update(para) {
	return request({
		url: '/projectFaceDevice/update',
		method: 'post',
		data: para
	})
}

//删除人脸设备
export function projectFaceDevice_delete(params) {
	return request({
		url: '/projectFaceDevice/delete',
		method: 'get',
		params
	})
}

//人脸设备列表
export function projectFaceDevice_list(data) {
	return request({
		url: '/projectFaceDevice/list',
		method: 'post',
		data,
	})
}

//人脸设备详情
export function projectFaceDevice_view(id) {
	return request({
		url: '/projectFaceDevice/view',
		method: 'get',
		params: {
			id
		}
	})
}

//获取人脸设备权限
export function projectFaceDevice_projectFaceDeviceRoles(id) {
	return request({
		url: '/projectFaceDevice/projectFaceDeviceRoles',
		method: 'get',
		params: {
			id
		}
	})
}

//保存人脸设备权限
export function projectFaceDevice_commitUserRole(data) {
	return request({
		url: '/projectFaceDevice/commitUserRole',
		method: 'post',
		data: {
			id: data.id,
			roleIds: data.roleIds,
		}
	})
}
